package com.vkmessenger.gui.activities.auth;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import com.vkmessenger.R;

/**
 * Created by IntelliJ IDEA.
 * User: Evgeniy Krasko
 * Date: 24.05.12
 * Time: 21:55
 */
public class RegisterActivity extends Activity {
    private View imagePhone, imageName, imageSurname;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.register);

        linkComponents();
    }

    public void linkComponents() {
        findViewById(R.id.button_back_to_login).setOnClickListener(new View.OnClickListener() {
            public void onClick(View view) {
                finish();
            }
        });

        imagePhone = findViewById(R.id.image_register_phone);
        imageName = findViewById(R.id.image_register_name);
        imageSurname = findViewById(R.id.image_register_surname);
        
        findViewById(R.id.button_register).setOnClickListener(new View.OnClickListener() {
            public void onClick(View view) {
                setUserNotifiersState(true);//TODO interaction with server here
            }
        });
    }

    public void setUserNotifiersState(boolean on) {
        int visibility = on ? View.VISIBLE : View.INVISIBLE;
        imagePhone.setVisibility(visibility);
        imageName.setVisibility(visibility);
        imageSurname.setVisibility(visibility);
    }


}
